3.1292 \(\int \frac {(a+b \tan ^{-1}(c x)) (d+e \log (1+c^2 x^2))}{x^2} \, dx\)

Optimal. Leaf size=100 \[ -\frac {\left (a+b \tan ^{-1}(c x)\right ) \left (e \log \left (c^2 x^2+1\right )+d\right )}{x}+\frac {c e \left (a+b \tan ^{-1}(c x)\right )^2}{b}+\frac {1}{2} b c \log \left (1-\frac {1}{c^2 x^2+1}\right ) \left (e \log \left (c^2 x^2+1\right )+d\right )-\frac {1}{2} b c e \text {Li}_2\left (\frac {1}{c^2 x^2+1}\right ) \]

[Out]

c*e*(a+b*arctan(c*x))^2/b-(a+b*arctan(c*x))*(d+e*ln(c^2*x^2+1))/x+1/2*b*c*(d+e*ln(c^2*x^2+1))*ln(1-1/(c^2*x^2+
1))-1/2*b*c*e*polylog(2,1/(c^2*x^2+1))

________________________________________________________________________________________

Rubi [A]  time = 0.25, antiderivative size = 92, normalized size of antiderivative = 0.92, number of steps used = 8, number of rules used = 8, integrand size = 26, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.308, Rules used = {5017, 2475, 2411, 2344, 2301, 2316, 2315, 4884} \[ -\frac {1}{2} b c e \text {PolyLog}\left (2,-c^2 x^2\right )-\frac {\left (a+b \tan ^{-1}(c x)\right ) \left (e \log \left (c^2 x^2+1\right )+d\right )}{x}+\frac {c e \left (a+b \tan ^{-1}(c x)\right )^2}{b}-\frac {b c \left (e \log \left (c^2 x^2+1\right )+d\right )^2}{4 e}+b c d \log (x) \]

Antiderivative was successfully verified.

[In]

Int[((a + b*ArcTan[c*x])*(d + e*Log[1 + c^2*x^2]))/x^2,x]

[Out]

(c*e*(a + b*ArcTan[c*x])^2)/b + b*c*d*Log[x] - ((a + b*ArcTan[c*x])*(d + e*Log[1 + c^2*x^2]))/x - (b*c*(d + e*
Log[1 + c^2*x^2])^2)/(4*e) - (b*c*e*PolyLog[2, -(c^2*x^2)])/2

Rule 2301

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))/(x_), x_Symbol] :> Simp[(a + b*Log[c*x^n])^2/(2*b*n), x] /; FreeQ[{a
, b, c, n}, x]

Rule 2315

Int[Log[(c_.)*(x_)]/((d_) + (e_.)*(x_)), x_Symbol] :> -Simp[PolyLog[2, 1 - c*x]/e, x] /; FreeQ[{c, d, e}, x] &
& EqQ[e + c*d, 0]

Rule 2316

Int[((a_.) + Log[(c_.)*(x_)]*(b_.))/((d_) + (e_.)*(x_)), x_Symbol] :> Simp[((a + b*Log[-((c*d)/e)])*Log[d + e*
x])/e, x] + Dist[b, Int[Log[-((e*x)/d)]/(d + e*x), x], x] /; FreeQ[{a, b, c, d, e}, x] && GtQ[-((c*d)/e), 0]

Rule 2344

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)/((x_)*((d_) + (e_.)*(x_))), x_Symbol] :> Dist[1/d, Int[(a + b*
Log[c*x^n])^p/x, x], x] - Dist[e/d, Int[(a + b*Log[c*x^n])^p/(d + e*x), x], x] /; FreeQ[{a, b, c, d, e, n}, x]
 && IGtQ[p, 0]

Rule 2411

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.)*((f_.) + (g_.)*(x_))^(q_.)*((h_.) + (i_.)*(x_))
^(r_.), x_Symbol] :> Dist[1/e, Subst[Int[((g*x)/e)^q*((e*h - d*i)/e + (i*x)/e)^r*(a + b*Log[c*x^n])^p, x], x,
d + e*x], x] /; FreeQ[{a, b, c, d, e, f, g, h, i, n, p, q, r}, x] && EqQ[e*f - d*g, 0] && (IGtQ[p, 0] || IGtQ[
r, 0]) && IntegerQ[2*r]

Rule 2475

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_)^(n_))^(p_.)]*(b_.))^(q_.)*(x_)^(m_.)*((f_) + (g_.)*(x_)^(s_))^(r_.),
 x_Symbol] :> Dist[1/n, Subst[Int[x^(Simplify[(m + 1)/n] - 1)*(f + g*x^(s/n))^r*(a + b*Log[c*(d + e*x)^p])^q,
x], x, x^n], x] /; FreeQ[{a, b, c, d, e, f, g, m, n, p, q, r, s}, x] && IntegerQ[r] && IntegerQ[s/n] && Intege
rQ[Simplify[(m + 1)/n]] && (GtQ[(m + 1)/n, 0] || IGtQ[q, 0])

Rule 4884

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^(p_.)/((d_) + (e_.)*(x_)^2), x_Symbol] :> Simp[(a + b*ArcTan[c*x])^(p +
 1)/(b*c*d*(p + 1)), x] /; FreeQ[{a, b, c, d, e, p}, x] && EqQ[e, c^2*d] && NeQ[p, -1]

Rule 5017

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))*((d_.) + Log[(f_.) + (g_.)*(x_)^2]*(e_.))*(x_)^(m_.), x_Symbol] :> Simp
[(x^(m + 1)*(d + e*Log[f + g*x^2])*(a + b*ArcTan[c*x]))/(m + 1), x] + (-Dist[(b*c)/(m + 1), Int[(x^(m + 1)*(d
+ e*Log[f + g*x^2]))/(1 + c^2*x^2), x], x] - Dist[(2*e*g)/(m + 1), Int[(x^(m + 2)*(a + b*ArcTan[c*x]))/(f + g*
x^2), x], x]) /; FreeQ[{a, b, c, d, e, f, g}, x] && ILtQ[m/2, 0]

Rubi steps

\begin {align*} \int \frac {\left (a+b \tan ^{-1}(c x)\right ) \left (d+e \log \left (1+c^2 x^2\right )\right )}{x^2} \, dx &=-\frac {\left (a+b \tan ^{-1}(c x)\right ) \left (d+e \log \left (1+c^2 x^2\right )\right )}{x}+(b c) \int \frac {d+e \log \left (1+c^2 x^2\right )}{x \left (1+c^2 x^2\right )} \, dx+\left (2 c^2 e\right ) \int \frac {a+b \tan ^{-1}(c x)}{1+c^2 x^2} \, dx\\ &=\frac {c e \left (a+b \tan ^{-1}(c x)\right )^2}{b}-\frac {\left (a+b \tan ^{-1}(c x)\right ) \left (d+e \log \left (1+c^2 x^2\right )\right )}{x}+\frac {1}{2} (b c) \operatorname {Subst}\left (\int \frac {d+e \log \left (1+c^2 x\right )}{x \left (1+c^2 x\right )} \, dx,x,x^2\right )\\ &=\frac {c e \left (a+b \tan ^{-1}(c x)\right )^2}{b}-\frac {\left (a+b \tan ^{-1}(c x)\right ) \left (d+e \log \left (1+c^2 x^2\right )\right )}{x}+\frac {b \operatorname {Subst}\left (\int \frac {d+e \log (x)}{x \left (-\frac {1}{c^2}+\frac {x}{c^2}\right )} \, dx,x,1+c^2 x^2\right )}{2 c}\\ &=\frac {c e \left (a+b \tan ^{-1}(c x)\right )^2}{b}-\frac {\left (a+b \tan ^{-1}(c x)\right ) \left (d+e \log \left (1+c^2 x^2\right )\right )}{x}+\frac {b \operatorname {Subst}\left (\int \frac {d+e \log (x)}{-\frac {1}{c^2}+\frac {x}{c^2}} \, dx,x,1+c^2 x^2\right )}{2 c}-\frac {1}{2} (b c) \operatorname {Subst}\left (\int \frac {d+e \log (x)}{x} \, dx,x,1+c^2 x^2\right )\\ &=\frac {c e \left (a+b \tan ^{-1}(c x)\right )^2}{b}+b c d \log (x)-\frac {\left (a+b \tan ^{-1}(c x)\right ) \left (d+e \log \left (1+c^2 x^2\right )\right )}{x}-\frac {b c \left (d+e \log \left (1+c^2 x^2\right )\right )^2}{4 e}+\frac {(b e) \operatorname {Subst}\left (\int \frac {\log (x)}{-\frac {1}{c^2}+\frac {x}{c^2}} \, dx,x,1+c^2 x^2\right )}{2 c}\\ &=\frac {c e \left (a+b \tan ^{-1}(c x)\right )^2}{b}+b c d \log (x)-\frac {\left (a+b \tan ^{-1}(c x)\right ) \left (d+e \log \left (1+c^2 x^2\right )\right )}{x}-\frac {b c \left (d+e \log \left (1+c^2 x^2\right )\right )^2}{4 e}-\frac {1}{2} b c e \text {Li}_2\left (-c^2 x^2\right )\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.11, size = 111, normalized size = 1.11 \[ -\frac {\left (a+b \tan ^{-1}(c x)\right ) \left (e \log \left (c^2 x^2+1\right )+d\right )}{x}+\frac {c e \left (a+b \tan ^{-1}(c x)\right )^2}{b}+b c \left (\frac {1}{2} e \text {Li}_2\left (c^2 x^2+1\right )-\frac {\left (e \log \left (c^2 x^2+1\right )+d\right ) \left (-2 e \log \left (-c^2 x^2\right )+e \log \left (c^2 x^2+1\right )+d\right )}{4 e}\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[((a + b*ArcTan[c*x])*(d + e*Log[1 + c^2*x^2]))/x^2,x]

[Out]

(c*e*(a + b*ArcTan[c*x])^2)/b - ((a + b*ArcTan[c*x])*(d + e*Log[1 + c^2*x^2]))/x + b*c*(-1/4*((d + e*Log[1 + c
^2*x^2])*(d - 2*e*Log[-(c^2*x^2)] + e*Log[1 + c^2*x^2]))/e + (e*PolyLog[2, 1 + c^2*x^2])/2)

________________________________________________________________________________________

fricas [F]  time = 0.42, size = 0, normalized size = 0.00 \[ {\rm integral}\left (\frac {b d \arctan \left (c x\right ) + a d + {\left (b e \arctan \left (c x\right ) + a e\right )} \log \left (c^{2} x^{2} + 1\right )}{x^{2}}, x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*arctan(c*x))*(d+e*log(c^2*x^2+1))/x^2,x, algorithm="fricas")

[Out]

integral((b*d*arctan(c*x) + a*d + (b*e*arctan(c*x) + a*e)*log(c^2*x^2 + 1))/x^2, x)

________________________________________________________________________________________

giac [F(-1)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*arctan(c*x))*(d+e*log(c^2*x^2+1))/x^2,x, algorithm="giac")

[Out]

Timed out

________________________________________________________________________________________

maple [F]  time = 11.28, size = 0, normalized size = 0.00 \[ \int \frac {\left (a +b \arctan \left (c x \right )\right ) \left (d +e \ln \left (c^{2} x^{2}+1\right )\right )}{x^{2}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*arctan(c*x))*(d+e*ln(c^2*x^2+1))/x^2,x)

[Out]

int((a+b*arctan(c*x))*(d+e*ln(c^2*x^2+1))/x^2,x)

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \[ -\frac {1}{2} \, {\left (c {\left (\log \left (c^{2} x^{2} + 1\right ) - \log \left (x^{2}\right )\right )} + \frac {2 \, \arctan \left (c x\right )}{x}\right )} b d + {\left (2 \, c \arctan \left (c x\right ) - \frac {\log \left (c^{2} x^{2} + 1\right )}{x}\right )} a e + b e \int \frac {\arctan \left (c x\right ) \log \left (c^{2} x^{2} + 1\right )}{x^{2}}\,{d x} - \frac {a d}{x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*arctan(c*x))*(d+e*log(c^2*x^2+1))/x^2,x, algorithm="maxima")

[Out]

-1/2*(c*(log(c^2*x^2 + 1) - log(x^2)) + 2*arctan(c*x)/x)*b*d + (2*c*arctan(c*x) - log(c^2*x^2 + 1)/x)*a*e + b*
e*integrate(arctan(c*x)*log(c^2*x^2 + 1)/x^2, x) - a*d/x

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.01 \[ \int \frac {\left (a+b\,\mathrm {atan}\left (c\,x\right )\right )\,\left (d+e\,\ln \left (c^2\,x^2+1\right )\right )}{x^2} \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((a + b*atan(c*x))*(d + e*log(c^2*x^2 + 1)))/x^2,x)

[Out]

int(((a + b*atan(c*x))*(d + e*log(c^2*x^2 + 1)))/x^2, x)

________________________________________________________________________________________

sympy [A]  time = 141.61, size = 160, normalized size = 1.60 \[ - \frac {a d}{x} + \frac {2 a e \operatorname {atan}{\left (\frac {x}{\sqrt {\frac {1}{c^{2}}}} \right )}}{\sqrt {\frac {1}{c^{2}}}} - \frac {a e \log {\left (c^{2} x^{2} + 1 \right )}}{x} - b c^{3} e \left (\begin {cases} 0 & \text {for}\: c^{2} = 0 \\\frac {\log {\left (c^{2} x^{2} + 1 \right )}^{2}}{4 c^{2}} & \text {otherwise} \end {cases}\right ) + 4 b c^{2} e \left (\begin {cases} 0 & \text {for}\: c = 0 \\\frac {\operatorname {atan}^{2}{\left (c x \right )}}{4 c} & \text {otherwise} \end {cases}\right ) - \frac {b c d \log {\left (c^{2} + \frac {1}{x^{2}} \right )}}{2} - \frac {b c e \operatorname {Li}_{2}\left (c^{2} x^{2} e^{i \pi }\right )}{2} - \frac {b d \operatorname {atan}{\left (c x \right )}}{x} - \frac {b e \log {\left (c^{2} x^{2} + 1 \right )} \operatorname {atan}{\left (c x \right )}}{x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*atan(c*x))*(d+e*ln(c**2*x**2+1))/x**2,x)

[Out]

-a*d/x + 2*a*e*atan(x/sqrt(c**(-2)))/sqrt(c**(-2)) - a*e*log(c**2*x**2 + 1)/x - b*c**3*e*Piecewise((0, Eq(c**2
, 0)), (log(c**2*x**2 + 1)**2/(4*c**2), True)) + 4*b*c**2*e*Piecewise((0, Eq(c, 0)), (atan(c*x)**2/(4*c), True
)) - b*c*d*log(c**2 + x**(-2))/2 - b*c*e*polylog(2, c**2*x**2*exp_polar(I*pi))/2 - b*d*atan(c*x)/x - b*e*log(c
**2*x**2 + 1)*atan(c*x)/x

________________________________________________________________________________________